package com.learn.english.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

import java.time.LocalDateTime;

/**
 * @author TISNIW
 * @version 1.0
 * @date 2024/10/20 9:21
 * @desc 用户实体类
 */
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("users")
public class User {

    @TableId(value = "id")
    private Long id;

    @TableField("role_id")
    private Integer roleId;

    @TableField("username")
    private String username;

    @TableField("uid")
    private String uid;

    @TableField("password")
    private String password;

    @TableField("email")
    private String email;

    @TableField("phone")
    private String phone;

    @TableField("real_name")
    private String realName;

    @TableField("avatar_url")
    private String avatarUrl;

    @TableField("department")
    private String department;

    @TableField("login_count")
    private Integer loginCount;

    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;

    @TableField("status")
    private Byte status;

    @TableField("remark")
    private String remark;

    @TableField("is_deleted")
    private Byte isDeleted;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}
